home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / finance / rebel30.zip / MATRIX.RB2 < prev    next >
Text File  |  1992-10-26  |  7KB  |  1 lines

  1. ~~Sv2~~Sw11~~Sr1~~Sd2~~Sm{7,0,7,0}~~R2C2Q17D79;     Examples, using the Matrix Algebra Package~~R5C2Q17D71;  NOTE:  To inspect the contents of any MATRIX CELL,~~R6C2Q17D71;  place the Cell Pointer over the cell and type "="~~R7C2Q17D71;  (without the quotes) at the Input Line.  This will~~R8C2Q17D71;  display each row of the matrix - one at a time.~~R9C2Q17D71;  Press the <Enter> key after viewing each row.~~R11C2Q17D79;----------------------------------------------------~~R12C2Q17D79;FEEL FREE TO RE-ENTER ANY VALUE DISPLAYED IN YELLOW!~~R13C2Q17D79;----------------------------------------------------~~R17C1Q17D75;   EXAMPLE 1:  Given the following elements . . .~~R19C2D14E0{3e+00};3~~R19C3D14E0{1e+00};1~~R19C4D14E0{-1e+00};-1~~R20C2D14E0{2e+00};2~~R20C3D14E0{4e+00};4~~R20C4D14E0{0};0~~R21C2D14E0{4e+00};4~~R21C3D14E0{-6e+00};-6~~R21C4D14E0{5e+00};5~~R23C3Q9D75;   . . . form matrix A    -->~~R23C6D75M9{19,2|19,3|19,4|20,2|20,3|20,4|21,2|21,3|21,4}F4096E11{0|3e+00|3e+00|3e+00|1e+00|-1e+00|2e+00|4e+00|0|4e+00|-6e+00|5e+00};@Matrix(3,3,~1,~2,~3,~4,~5,~6,~7,~8,~9)~~R23C7Q1D64;  (A)~~R25C2Q9D79;  1)  INVERSE of matrix A    -->~~R25C6D67M1{23,6}F4096E11{5.5e+00|3e+00|3e+00|2.564102564102564e-01|1.282051282051282e-02|5.128205128205128e-02|-1.282051282051282e-01|2.435897435897436e-01|-2.564102564102564e-02|-3.58974358974359e-01|2.82051282051282e-01|1.282051282051282e-01};@MatrixInverse(~1)~~R26C2Q13D79;  2)  TRANSPOSE of matrix A    -->~~R26C6D67M1{23,6}F4096E11{5.5e+00|3e+00|3e+00|3e+00|2e+00|4e+00|1e+00|4e+00|-6e+00|-1e+00|0|5e+00};@MatrixTranspose(~1)~~R27C2Q13D79;  3)  MULTIPLY A by its Inverse  -->~~R27C6D67M2{23,6|25,6}F4096E11{5.5e+00|3e+00|3e+00|9.999999999999999e-01|0|0|0|1e+00|0|-1.665334536937735e-16|1.110223024625157e-16|9.999999999999999e-01};@MatrixProduct(~1,~2)~~R28C2Q13D79;  4)  MULTIPLY A by scalar a (2.0)   -->~~R28C6D67M1{23,6}F4096E11{5.5e+00|3e+00|3e+00|6e+00|2e+00|-2e+00|4e+00|8e+00|0|8e+00|-1.2e+01|1e+01};@MatrixScalar(~1,2)~~R29C2Q13D79;  5)  MULTIPLY A by itself 3 times   -->~~R29C6D67M1{23,6}F4096E11{5.5e+00|3e+00|3e+00|1.5e+01|1.07e+02|-4.7e+01|7e+01|9.8e+01|-2.4e+01|4.4e+01|-3.06e+02|8.5e+01};@MatrixExponent(~1,3)~~R30C2Q13D79;  6)  ADD matrix A to itself   -->~~R30C6D67M1{23,6}F4096E11{5.5e+00|3e+00|3e+00|6e+00|2e+00|-2e+00|4e+00|8e+00|0|8e+00|-1.2e+01|1e+01};@MatrixAdd(~1,~1)~~R31C2Q13D79;  7)  SUBTRACT matrix A from itself  -->~~R31C6D67M1{23,6}F4096E11{5.5e+00|3e+00|3e+00|0|0|0|0|0|0|0|0|0};@MatrixSubtract(~1,~1)~~R32C2Q13D79;  8)  DETERMINANT of matrix A    -->~~R32C6D71M1{23,6}E0{7.8e+01};determinant(~1)~~R36C1Q25D75;   EXAMPLE 2:  Find the solution set for the following system of equations:~~R38C2Q9D79;System of Simultaneous Equations:~~R40C2Q1D75;       (x)~~R40C3Q1D75;       (y)~~R40C4Q1D75;       (z)~~R40C6Q5D75;    (constant)~~R41C2D14E0{1e+01};10~~R41C3D14E0{2e+00};2~~R41C4D14E0{-4e+00};-4~~R41C5Q1D64;          =~~R41C6D14E0{2e+00};2~~R42C2D14E0{0};0~~R42C3D14E0{9e+00};9~~R42C4D14E0{-1e+00};-1~~R42C5Q1D64;          =~~R42C6D14E0{7e+00};7~~R43C2D14E0{0};0~~R43C3D14E0{0};0~~R43C4D14E0{1.1e+01};11~~R43C5Q1D64;          =~~R43C6D14E0{4e+00};4~~R45C2Q5D79;Augmented Matrix:~~R45C4D67M12{41,2|41,3|41,4|41,6|42,2|42,3|42,4|42,6|43,2|43,3|43,4|43,6}F4096E14{0|3e+00|4e+00|1e+01|2e+00|-4e+00|2e+00|0|9e+00|-1e+00|7e+00|0|0|1.1e+01|4e+00};@Matrix(3,4,~1,~2,~3,~4,~5,~6,~7,~8,~9,~10,~11,~12)~~R46C2Q5D79;Solution set:~~R46C4D67M1{45,4}F4096E5{2.5e+00|3e+00|1e+00|1.818181818181818e-01|8.181818181818182e-01|3.636363636363636e-01};@MatrixSolve(~1)~~R46C5Q1D75;      (x) =~~R46C6D75X10E0{1.818181818181818e-01};[row(0),4,3]~~R47C5Q1D75;      (y) =~~R47C6D75X10E0{8.181818181818182e-01};[row(-1),4,4]~~R48C5Q1D75;      (z) =~~R48C6D75X10E0{3.636363636363636e-01};[row(-2),4,5]~~R52C1Q21D75;   EXAMPLE 3:  Transform a POLYGON, using matrix operations~~R54C2Q5D79;Initial Polygon:~~R54C5D75F12288E14{7e+00|3e+02|3e+02|8.033268502094768e+01|1.987707175275167e+02|8.00395864749202e+01|2.995302912326605e+02|4.380775397897022e+01|3.577580398924312e+02|2.001938197423283e+02|5.71693540534701e+02|3.829569371542981e+02|5.935046962550786e+02|2.999968341682672e+02|3.000040636960547e+02};@Polygon()~~R56C2Q5D75;  (1) Translate by:~~R56C4D14E0{0};0~~R56C6D75M1{56,4}F4096E11{0|3e+00|3e+00|1e+00|0|0|0|1e+00|0|0|0|1e+00};@Matrix(3,3,1,0,0,0,1,0,~1,~1,1)~~R57C2Q5D75;  (2) Rotate by:~~R57C4D14E0{3e+01};30~~R57C6D75M1{57,4}F4096E11{0|3e+00|3e+00|1.54251449887584e-01|9.880316240928618e-01|0|-9.880316240928618e-01|1.54251449887584e-01|0|0|0|1e+00};@Matrix(3,3,cos(~1),-sin(~1),0,sin(~1),cos(~1),0,0,0,1)~~R58C2Q5D75;  (3) Scale by:~~R58C4D14E0{1e+00};1~~R58C6D75M1{58,4}F4096E11{0|3e+00|3e+00|1e+00|0|0|0|1e+00|0|0|0|1e+00};@Matrix(3,3,~1,0,0,0,~1,0,0,0,1)~~R59C2Q9D67;      Concatinate Matrices:~~R59C6D67M2{56,6|57,6}F4096E11{5.5e+00|3e+00|3e+00|1.54251449887584e-01|9.880316240928618e-01|0|-9.880316240928618e-01|1.54251449887584e-01|0|0|0|1e+00};@MatrixProduct(~1,~2)~~R60C2Q9D67;      Transforation Matrix:~~R60C6D67M2{59,6|58,6}F4096E11{5.5e+00|3e+00|3e+00|1.54251449887584e-01|9.880316240928618e-01|0|-9.880316240928618e-01|1.54251449887584e-01|0|0|0|1e+00};@MatrixProduct(~1,~2)~~R61C5Q1D67;-----------~~R62C2Q5D79;Transformed Polygon:~~R62C5D75M2{54,5|60,6}F12288E14{7e+00|-2.501340522615833e+02|3.426849221941338e+02|-1.84000321722972e+02|1.100319046228021e+02|-2.835991778494543e+02|1.252846243244246e+02|-3.467188476196229e+02|9.846814267405013e+01|-5.339711103841112e+02|2.859823823722102e+02|-5.27329746147087e+02|4.699225244866252e+02|-2.50138555655931e+02|3.426824210832735e+02};@MatrixProduct(~1,~2)~~R65C2Q17D71;NOTE:  Use the UTILITY:Plot menu option to display both~~R66C2Q5D71;       polygons!~~R70C1Q17D75;   EXAMPLE 4:  Find the DOT PRODUCT of vectors U and V:~~R72C2Q1D79;    (U)~~R72C4Q1D79;    (V)~~R73C2D67F4096E7{0|1e+00|5e+00|3e+00|1e+00|2e+00|7e+00|-1e+00};@Matrix(1,5,3,1,2,7,-1)~~R73C3Q1D64;     *~~R73C4D67F4096E7{0|1e+00|5e+00|4e+00|5e+00|0|-2e+00|3e+00};@Matrix(1,5,4,5,0,-2,3)~~R73C5Q1D64;     =~~R73C6D75M2{73,2|73,4}E0{0};dotproduct(~1,~2)~~R78C1Q21D75;   EXAMPLE 5:  Find the CROSS PRODUCT of vectors U and V:~~R80C2Q1D79;    (U)~~R80C4Q1D79;    (V)~~R81C2D67F4096E5{0|1e+00|3e+00|3e+00|-1e+00|2e+00};@Matrix(1,3,3,-1,2)~~R81C3Q1D64;     x~~R81C4D67F4096E5{0|1e+00|3e+00|4e+00|7e+00|1e+00};@Matrix(1,3,4,7,1)~~R81C5Q1D64;     =~~R81C6D75M2{81,2|81,4}F4096E5{2.5e+00|1e+00|3e+00|-1.5e+01|5e+00|2.5e+01};@MatrixCrossProduct(~1,~2)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~